﻿FROM registry.cn-hangzhou.aliyuncs.com/nippon_dockerimage/nippon_netcore_runtime:5.0-buster-slim-bpmversion AS base
WORKDIR /app
EXPOSE 80
#EXPOSE 443

FROM registry.cn-hangzhou.aliyuncs.com/nippon_dockerimage/nippon_netcore_build:5.0-buster-bpmversion AS build
WORKDIR /src
COPY . .
WORKDIR /src/host/NP.BPMReportPlatform.BackgroundJobs.Host
RUN dotnet restore -nowarn:msb3202,nu1503 --configfile "/NuGet.Config"
# RUN dotnet build --no-restore -c Release -o /app

FROM build AS publish
RUN dotnet publish --no-restore -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .

ENV ASPNETCORE_URLS http://+:80

ENTRYPOINT ["dotnet", "NP.BPMReportPlatform.BackgroundJobs.Host.dll"]
